const router = require("koa-router")();
const DB = require("../../module/db.js");

/**
 * 获取导航列表
 * api/navs/getNavs
*/
router.get("/getNavs", async (ctx) => {
  var page = ctx.query.page || 1;
  var pageSize = 100;
  var result = await DB.find("nav", {}, {}, pageSize, page);
  ctx.body = {
    code: 200,
    data: result
  }
});
module.exports=router.routes();